import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-07-27  19:56
 */
public class Test5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib(n));
    }

    public static int fib(int n) {
        int a = 1;
        int b = 1;
        int sum = 0;
        if(n ==1 || n == 2) {
            return 1;
        }
        for (int i = 3; i <=n ; i++) {
            sum = a +b;
            a = b;
            b = sum;
        }
        return sum;
    }
}
